<template>
    <h1>begin</h1>
    <slot name="t1" :array="array"></slot>
    <h1 ref="end">end</h1>
</template>

<script setup lang="js" name="test">
import { reactive, ref } from 'vue';
let array = reactive([1, 2, 3, 4, 5]);
let name = ref('zhangsan');
let end = ref();
console.log(end);

defineExpose({ name, array })
</script>
<style scoped></style>